<!DOCTYPE html>
<html lang="zh_CN">

<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>题目详情</title>
	<meta name="viewport" content="initial-scale=1, maximum-scale=1">
	<!-- <link rel="shortcut icon" href="http://favicon.ico"> -->
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="viewport"
		content="width=device-width, height=device-height, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">

	<!--<link rel="stylesheet" href="//g.alicdn.com/msui/sm/0.6.2/css/sm-extend.min.css">-->

	<!-- 固定的css 和 common.js 的引用    -->
	<link rel="stylesheet" href="http://47.104.254.28/commonfile/css/sm.min.css">
	<!--<link rel="stylesheet" href="../css/sm-extend.min.css">-->
	<link rel="stylesheet" href="http://47.104.254.28/commonfile/css/swiper.min.css">
	<link rel="stylesheet" href="http://47.104.254.28/commonfile/css/common.css">
	<script type="text/javascript" src="http://47.104.254.28/commonfile/common/common/common.js"></script>
	<!-- <script type="text/javascript" src="../../common/common/common.js"></script> -->

	<!-- <link rel="stylesheet" href="../../css/sm.min.css">
	<link rel="stylesheet" href="../../css/swiper.min.css">
	<link rel="stylesheet" href="../../css/common.css">
	<script type="text/javascript" src="../../common/common/common.js"></script> -->

	<!-- <script type="text/javascript" src="http://47.104.254.28/commonfile/js/js/vconsole.min.js"></script>
		<script>
			var vConsole = new VConsole();
		</script> -->



	<style type="text/css">
		/*css 的样式都放在这里*/
		/*整体样式*/
		#content {
			box-sizing: border-box;
			width: 100%;
			padding: 0.5rem;
			height: 100%;
			overflow-y: scroll;
			-webkit-overflow-scrolling: touch;
			background: #fff;
		}

		.bar:after {
			z-index: 99;
		}

		/*来源样式*/
		#xuanti_laiyuan_one,
		#xuanti_laiyuan_two {
			display: none;
			color: #FF6A49;
			font-size: 16px;
		}

		/*选题种类*/
		/*来源与选题之间的距离*/
		#xuanti_leixing {
			display: none;
			margin-top: 15px;
		}

		#xuanti_leixing_one {
			display: none;
			/* color: #5296f7; */
			color: #5296f7;
			font-weight: 900;
			/*text-decoration:underline;*/
			border-bottom: solid 2px #5296f7;
		}

		/*选题类型与题干之间的距离*/
		#xuanti_leixing {
			display: none;
			margin-bottom: 8px;
		}

		/*选项格式*/
		#xuanti_xuanxiang ul {
			list-style-type: none;
		}

		#xuanti_xuanxiang ul li {
			/* border: solid gainsboro 1px; */
			margin-bottom: 4px;
			padding-bottom: 6px;
			padding-top: 6px;
			border-radius: 2px;
			/*width: 107%;
 		margin-left: -10%;*/
		}

		/*下一题样式*/
		#xuanti_xiyiti {
			text-align: center;
			margin-top: 40px;
		}

		/*工具栏样式*/
		.tab-label {
			color: #02CAAD;
		}

		/*单选题table样式*/
		.xuanxiang_danxuan_table,
		.xuanxiang_duoxuan .douxuan-table {
			display: flex;
			align-items: center;
			width: 100%;
		}

		.xuanxiang_danxuan_first_td,
		.xuanxiang_duoxuan_first_td {
		}

		.choosebox {
			box-sizing: border-box;
			width: 1.5rem;
			height: 1.5rem;
			/* border: 1px solid #5296f7; */
			color: #3861f1;
			position: relative;
			border-radius: 50%;
		}

		.choosebox div {
			box-sizing: border-box;
			padding-top: 0.05rem;
			font-size: 0.7rem;
			width: 100%;
			height: 100%;
			text-align: center;
			line-height: 1.5rem;
		}

		.choosebox::after {
			content: ' ';
			position: absolute;
			top: -50%;
			left: -50%;
			right: -50%;
			bottom: -50%;
			border: 1px solid #3861f1;
			border-radius: 50%;
			transform: scale(0.5);
		}

		.xuanxiang_danxuan_first_td .active,
		.xuanxiang_duoxuan_first_td .active {
			background-color: #3861f1;
			color: #fff;
		}

		.xuanxiang_danxuan_second_td,
		.xuanxiang_duoxuan_second_td {
			/* width: 85%; */
			flex: 1;
			padding-left: 0.5rem;
			/*border: solid 1px red;*/
		}

		/*点击选项后的样式*/
		/*选择对勾样式*/
		.xuanze_duigou_danxuan {
			border: solid 1px red;
			width: 7%;
			color: white;
			display: none;
		}

		.xuanze_duigou_duoxuan {
			border: solid 1px red;
			width: 7%;
			color: white;
			display: none;
		}

		/*选择文本样式*/
		.xuanze_wenben_danxuan {
			margin-left: 10px;
		}

		/*选题整体页面背景*/
		#xuanti_beijing {
			/*background-color: white;*/
		}

		/*多选题样式切换*/
		/*.duoxuan_duigou_qiehuan{
  		display: block;
  	}*/
		.duoxuan_wenben_qiehuan {
			color: white;
		}

		.duoxuan_beijing_qiehuan {
			background-color: #55E9D0;
		}

		/*填空题样式*/
		#tiankongti_tiankong {
			width: 100%;
			padding: 10px;
			margin-top: 7px;
		}

		.tilei_ui {
			padding: 0px;
			/*border: solid 1px red;*/
		}

		/*.tilei_ui li{
  		width: 90%;
  	}*/
		/*问答题样式*/
		#wendati_wenda {
			width: 94%;
			margin-left: 3%;
			margin-top: 10px;
			height: 140px;
		}

		.content .swiper-container {
			width: 100%;
			height: 100%;
		}

		.swiper-boxs {
			box-sizing: border-box;
			padding-top: 1.8rem;
			width: 100%;
			height: 100%;
		}

		#swiperWrapper {
			font-size: 0.85rem;
		}

		#xuanti_xiayiti {
			background-image: none;
			width: 100%;
			text-align: center;
			margin: 0 auto;
			top: 18.5rem;
		}

		/*阴影层样式*/
		#danji_datika_yinyingceng {
			width: 100%;
			height: 100%;
			background-color: black;
			position: absolute;
			left: 0px;
			top: 0px;
			display: none;
			opacity: 0.5;
			z-index: 100;
		}

		/*阴影层的覆盖层样式*/
		#danji_datika_yinyingceng_fugaiceng {
			width: 90%;
			height: 85%;
			margin-left: 5%;
			margin-right: 5%;
			margin-top: 7%;
			/*margin-top:10%;*/
			/*border: solid 1px red;*/
			/*width: 100%;
  		height: 100%; */
			position: absolute;
			left: 0px;
			top: 0px;
			display: none;
			z-index: 105;
		}

		/*答题卡页面*/
		#datika_yemian {
			width: 100%;
			height: 100%;
			/*width: 90%;
 		margin-left: 5%;*/
			background-color: white;
			overflow: auto;
			/*border: solid 1px red;*/
			/*height: 90%;
 		margin-top: 10%;*/
		}

		/*答题卡关闭位置*/
		#datika_guanbi_div_span {
			text-align: right;
			/*width: auto;*/
			/*display:inline-block;*/
			/*border: solid 1px red;*/
		}

		/*答题卡样式*/
		#datika_first_div {
			/*border: solid red 1px;*/
			/*margin-top: 3rem;*/
			font-weight: 700;
			color: #02D9B9;
			padding-top: 1rem;
			padding-bottom: 1rem;
			text-align: center;
		}

		#datika_first_div span {
			/*border: solid red 1px;*/
			/*margin-top: 3rem;*/
			padding-left: 1.5rem;
			padding-right: 1.5rem;
			background: url(http://47.104.254.28/commonfile/img/img/img_green_line_left.png),
				url(http://47.104.254.28/commonfile/img/img/img_green_line_right.png);
			background-repeat: no-repeat;
			background-size: 1rem 0.5rem;
			background-position: 0 center,
				100% center;
		}

		/*答题卡详细大小*/
		#datika_xiangxidaxiao {
			width: 94%;
			margin-left: 3%;
		}

		/*提交设计*/
		#datika_five_div {
			margin-top: 2rem;
			margin-bottom: 2rem;
			text-align: center;
			color: white;
			/*border: solid red 1px ;*/
			/*margin-top: 100px ;*/
		}

		/*语言文字运用样式*/
		/*#datika_two_1_div ul{
  		padding-left: 0px;
  		list-style-type: none;
  	}  	
  	#datika_two_1_div ul li{
  		list-style-position: outside;
  		width: 10%;
  		height: 50px;
  		float: left;
  	}*/
		/*阅读理解样式*/
		#datika_three_div {
			margin-top: 10%;
		}

		/*文言文阅读样式*/
		#datika_four_div {
			margin-top: 10%;
		}

		/*交卷并查看结果*/
		#datika_five_span_child {
			padding-bottom: 0.7rem;
			padding-top: 0.7rem;
			padding-left: 2.5rem;
			padding-right: 2.5rem;
			background-color: #02D9B9;
			border-radius: 5px;
		}

		/*语言文字运用中的选项快大小*/
		.datika_two_2_div_class {
			width: 20%;
			float: left;
			border: solid 1px black;
		}

		/*阅读理解中的选项快大小*/
		.datika_three_2_div_class {
			width: 20%;
			float: left;
			border: solid 1px black;
		}

		/*文言文阅读中的选项快大小*/
		/*.datika_four_2_div_class{
  	width: 20%;
  	float: left;
  	}*/
		/*答题卡选项按钮*/
		.swiper-pagination {
			/*border: solid red 1px;*/
			text-align: left;
			position: static;
			padding-left: 0.4rem;
			padding-right: 0.4rem;
		}

		#anniubianju {
			/*padding-left: 0.8rem;*/
			/*padding-right: 0.3rem;*/
			/*text-align: center;*/
		}

		.swiper-pagination-bullet {
			/*width: 1.5rem;*/
			width: 12.5%;
			min-width: 1.5rem;
			height: 1.5rem;
			/*max-width: 1.5rem;
      	margin-left: ;
      	margin-right: ;*/
			/*margin-left: 0.3rem;*/
			/*margin-right: 0.4rem;*/
			/*display: block;*/
			/*float: left;*/
			margin-top: 0.2rem;
			margin-bottom: 0.2rem;
			text-align: center;
			line-height: 1.5rem;
			font-size: 12px;
			color: black;
			opacity: 1;
			background-color: white;
			/*border: solid darkgrey 1px;*/
		}

		.anniu_class {
			text-align: center;
			border: solid #02D9B9 1px;
			color: #02CAAD;
			width: 1.5rem;
			height: 1.5rem;
			border-radius: 50%;
			display: block;
			margin: 0 auto;
			/*width: 12.5%;*/
			/*float: left;*/
			/*text-align: center;*/
		}

		/*答题卡数字块*/
		/*.swiper-pagination-bullet{
   		color: red;
   		line-height: 40px;
   }*/
		/*所在页面的样式*/
		/*.swiper-pagination-bullet-active {
      color:#fff;
      background: #007aff;     
    }*/
		.page.page-current {
			background-color: white;
		}

		.swiper-button-next {
			color: #3d4145 !important;
		}

		.swiper-button-next:after {
			display: none;
		}

		.problem_img {
			display: block;
			max-width: 100%;
			max-height: 7.5rem;
			object-fit: scale-down;
		}

		.choice_img {
			display: block;
			max-width: 100%;
			max-height: 2.5rem;
			display: block;
			object-fit: scale-down;
		}

		.sub-nav {
			position: absolute;
			top: 0;
			left: 0;
			right: 0;
			z-index: 99;
			background: #fff;
		}

		.sub-nav-bar::after {
			content: ' ';
			position: absolute;
			bottom: 0;
			left: -50%;
			right: -50%;
			border: 1px solid #EBEEF5;
			transform: scale(0.5);
		}

		.sub-nav-bar {
			box-sizing: border-box;
			position: relative;
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 0 0.5rem;
			min-height: 1.8rem;
			font-size: 0.7rem;
			/* border-bottom: 1px solid #EBEEF5; */
		}

		.sub-nav-bar .sub-title {
			flex: 1;
			padding-right: 0.5rem;
			word-break: break-all;
		}

		.sub-nav-bar .sub-total {
			color: #808080;
		}

		.type-name {
			color: #3861f1;
		}

		.bar {
			background: #fff;
		}

		.icon.icon-left {
			color: #848484;
		}

		.icon img {
			width: 1.1rem;
			height: 1.1rem;
			display: block;
			line-height: 1;
		}

		.bar .icon.pull-right {
			margin-left: 1rem;
		}

		.title {
			color: #fff;
		}

		.time-box {
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
			height: 100%;
			padding-top: 0 !important;
			padding-bottom: 0 !important;
		}

		.time-box img {
			margin-top: 0.2rem;
			display: block;
		}

		.time-box span {
			position: relative;
			display: block;
			min-height: 1.1rem;
			/* min-width: 2.1rem; */
			padding: 0.2rem;
			padding-top: 0.3rem;
			font-weight: 400;
			font-size: 0.7rem;
			justify-content: center;
			color: #848484 !important;
			line-height: 1;
			font-family: 'HYQihei50S' !important;
		}

		.main-content {
			position: relative;
			width: 100%;
			height: 100%;
		}

		.document {
			box-sizing: border-box;
			width: 100%;
			height: 30%;
			padding: 0 0.5rem;
			background: #f8f8f8;
			overflow-y: scroll;
			-webkit-overflow-scrolling: touch;
		}

		.document img {
			max-width: 100%;
		}

		.question-box {
			position: absolute;
			top: 30%;
			left: 0;
			right: 0;
			bottom: 0;
			background: #fff;
			z-index: 10;
		}

		.question-wrap {
			box-sizing: border-box;
			position: relative;
			width: 100%;
			height: 100%;
			padding-top: 1rem;
			background: #f8f8f8;
		}

		.question-move {
			position: absolute;
			top: 0;
			left: 50%;
			transform: translateX(-50%);
			width: 80px;
			height: 1rem;
			border-radius: 0.4rem 0.4rem 0 0;
			background: #c1c1c1;
			box-sizing: border-box;
			overflow: hidden;
			z-index: 100;
		}

		.question-move span {
			display: block;
			width: 80%;
			margin: 0.23rem auto 0;
			border-top: 1px solid #fff;
		}

	</style>


</head>

<body>
	<div class="page-group">
		<div class="page page-current">
			<div id="" style="width: 100%;height: 100%;">
				<!-- html代码内容区域 -->
				<div class="content" id="tilei_centent">

					<!-- 暂停倒计时 -->

					<div class="sub-nav">
						<div class="sub-nav-bar">
							<div class="sub-title"></div>
							<!-- <div class="sub-total">
								<span id="currentIndex"></span>/<span id="currentTotal"></span>
							</div> -->
						</div>
					</div>

					<!-- Slider -->
					<div id="swiperWrapper" class="swiper-boxs">
						<div class="swiper-container" id="quanpingzhanshi">
							<div class="swiper-wrapper" id="content_body">

							</div>
						</div>
					</div>

				
				</div>

			</div>
	
		</div>
	</div>



	<!-- <script type="text/javascript"
		src="../../js/js/jquery-1.11.1.min.js"></script>
		<script type="text/javascript">var $$ = jQuery.noConflict();</script>
	<script type='text/javascript' src='../../zepto/zepto/zepto.min.js'
		charset='utf-8'></script>
	<script type='text/javascript' src='../../js/js/sm.min.js'
		charset='utf-8'></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.0.7/js/swiper.min.js"></script> -->


	<!-- 固定的js引用，所有的jQuery 要用 $$ 表示 -->
	<script type="text/javascript" src="http://47.104.254.28/commonfile/js/js/jquery-1.11.1.min.js"></script>
	<script type="text/javascript">var $$ = jQuery.noConflict();</script>
	<script type='text/javascript' src='http://47.104.254.28/commonfile/zepto/zepto/zepto.min.js'
		charset='utf-8'></script>
	<script type='text/javascript' src='http://47.104.254.28/commonfile/js/js/sm.min.js' charset='utf-8'></script>
	<script src="http://47.104.254.28/commonfile/js/js/swiper/swiper.min.js"></script>

	<script type="text/javascript">
		// 函数区域，函数放在“初始化区域的上面”
		var paper_id = "";
		var dati_time = "";
		var a = "";
		var aa = "";
		var shoucang_question_id = new Array();
		//	var banner_id = new Array();
		var canshu_id = 0;
		var swiper = '';
		var isChooseClick = true


		var mousePressedQuestion;
		var savBarHeight = $$('.sub-nav-bar').height();
		var barNav = $$('.bar-nav').height();

		function moveQuestionInit() {
			$$('.question-move').on('touchstart', function (e) {
				e.preventDefault();
				mousePressedQuestion = true;
			});

			$$('.question-move').on('touchmove', function (e) {
				e.preventDefault();
				if (!mousePressedQuestion) {
					return false;
				}
				let startY = e.originalEvent.changedTouches[0].pageY;
				let moveTop = parseInt(startY) - parseInt(savBarHeight) - parseInt(barNav);

				let questionBox = $$('.question-box').eq($$(this).index('.question-move'));
				let documents = $$('.document').eq($$(this).index('.question-move'));

				if (moveTop <= 0) {
					moveTop = 0;
				}
				if (moveTop >= ($$('.main-content').height() - $$(this).height())) {
					moveTop = $$('.main-content').height() - $$(this).height()
				}

				questionBox.css({ top: moveTop + 'px' });
				documents.height($$('.main-content').height() - questionBox.height());
			});

			$$('.question-move').on('touchend', function (e) {
				if (mousePressedQuestion) {
					mousePressedQuestion = false;
				}
			});
		}

		function getParams(data) {
			// data需要转成json调用 ，函数urlParamParseJson();
			var jsonData = urlParamParseJson(data);
			var params = {
				//	    	paper_id:jsonData.paper_id,
				//	    	sequence:jsonData.sequence
				paper_id:jsonData.paper_id,
				question_id:jsonData.question_id
			}
			//网络请求框架，需要传入成功函数回调和 失败函数回调
			// net_request('get', 'api/v1/papers/' + 1, params, successCallBack, errorCallBack);
			net_request('get','api/v1/showquestion',params,successCallBack,errorCallBack);
		}
		//成功的回调函数
		function successCallBack(data) {
			//		console.log(data);
			if (swiper) {
				swiper.destroy(false)
			}
			//题目
			var ob = data.data.questions;
			//题型	
			var type = "";
			var zhenghe = "";
			var questions_len = data.data.questions.length;
			//		console.log(questions_len/8);
			//		$$("#anniubianju").css("margin-bottom","10rem");
			paper_id = data.data.id;
			//		console.log(paper_id);
			//		答题时间
			dati_time = data.data.time;
			document.title = data.data.title;
			$$('.sub-nav-bar .sub-title').text(data.data.title);
			// $$('#currentTotal').text(data.data.questions.length);
			//		console.log(dati_time);
			try {
				if (isNotNull(ob)) {
					//			$$("#content_body").html("");
					$$("#content_body").html("");
					for (var i = 0; i < ob.length; i++) {
						//				console.log(ob[i].question_id)
						shoucang_question_id[i] = ob[i].question_id;
						var typeName = ''
						if (isNotNull(ob[i].type_name)) {
							typeName = `<span class="type-name" style="margin-left: -0.5rem">（${ob[i].type_name}）</span>`;
						} else {
							typeName = `<span class="type-name"></span>`;
						}
						ob[i].sequence = i + 1;
						var richText = ''
						if (isNotNull(ob[i].details)) {
							richText = ob[i].details
						}

						var problem_img = "";
							if (ob[i].problem_img) {
								problem_img = `<img class="problem_img" src="${ob[i].problem_img}">`;
								ob[i].problem = '';
							}

						type = ob[i].type;
						if (type == 0) {//单选题
							var str = "";
							//		var a='<div data="'+type+'" class="swiper-slide" id="banner'+i+'">'+str+'</div>';
							//		zhenghe += a;

							str += '\
				<div dataa="'+ type + '" class="swiper-slide" id="banner' + i + '" question_id="' + ob[i].question_id + '" answerzz="' + ob[i].answer + '" score="' + ob[i].score + '" data-sequence="' + ob[i].sequence + '">\
					<div class="main-content">\
						<div class="document">' + richText + '</div>\
						<div class="question-box">\
						<div class="question-wrap">\
						<div class="question-move"><span></span><span></span><span></span></div>\
						<div id="content">\
							<div id="xuanti_laiyuan">\
							<span id="xuanti_laiyuan_one">来源：</span>\
							<span id="xuanti_laiyuan_two">'+ data.data.title + '</span>\
							</div>\
						<div id="xuanti_leixing">\
							<span id="xuanti_leixing_one">单选题</span>\
						</div>\
						<div id="xuanti_neirong">\
							'+ typeName + ob[i].problem + problem_img + '\
						</div>\
						<div id="xuanti_xuanxiang">\
						<ul class="tilei_ui" id="xuanxiang_danxuan_ul" tdlength="'+ ob[i].choice.length + '">\
						';
							//选项块
							var str2 = "";
							for (var ii = 0; ii < ob[i].choice.length; ii++) {
								var choice_img = '';
								if (ob[i].choice[ii].choice_img) {
									choice_img = `<img class="choice_img" src="${ob[i].choice[ii].choice_img}">`;
								} else {
									choice_img = ob[i].choice[ii].choice;
								}
								// onclick="danxuan_danxuan(this)"
								str2 += '<li class="xuanxiang_danxuan_' + i + '" onclick="danxuan_danxuan(this)"  id="danxuan_banner_' + i + '_' + ii + '">\
								<div class="xuanxiang_danxuan_table">\
										<div class="xuanxiang_danxuan_first_td" id="danxuan_xuhao_'+ (ii + 1) + '"><div class="choosebox"><div>' + ob[i].choice[ii].choice_tag + '</div></div></div>\
										<div class="xuanxiang_danxuan_second_td" id="danxuan_xuhao_neirong">'+ choice_img + '</div>\
										<div class="xuanze_duigou_danxuan" id="duigou_'+ (ii + 1) + '" liid="danxuan_xuhao_' + (ii + 1) + '"></div>\
								</div>\
								</li>\
								';
							}
							str = str + str2;
							str += '</ul>\
						</div>\
						</div>\
						</div>\
						</div>\
					</div>\
				</div>\
				';
							$$("#content_body").append(str);
							//				$.reinitSwiper();
							//				console.log(str);
						}
						else if (type == 1) {//多选题
							var str = "";
							

							str = '\
				<div dataa="'+ type + '" class="swiper-slide" id="banner' + i + '" question_id="' + ob[i].question_id + '" answerzz="' + ob[i].answer + '" score="' + ob[i].score + '"  data-sequence="' + ob[i].sequence + '">\
					<div class="main-content">\
						<div class="document">' + richText + '</div>\
						<div class="question-box">\
						<div class="question-wrap">\
						<div class="question-move"><span></span><span></span><span></span></div>\
					<div id="content">\
					<div id="xuanti_laiyuan">\
					<span id="xuanti_laiyuan_one">来源：</span>\
					<span id="xuanti_laiyuan_two">'+ data.data.title + '</span>\
					</div>\
					<div id="xuanti_leixing">\
					<span id="xuanti_leixing_one">多选题</span>\
					</div>\
					<div id="xuanti_neirong">'+ typeName + ob[i].problem + problem_img + '</div>\
					<div id="xuanti_xuanxiang">\
					<ul class="tilei_ui" id="xuanxiang_duoxuan_ul" tdlength="'+ ob[i].choice.length + '">\
					';
							//选项块
							var op = ob[i].option;
							var str2 = "";
							for (var ii = 0; ii < ob[i].choice.length; ii++) {

								var choice_img = '';
								if (ob[i].choice[ii].choice_img) {
									choice_img = `<img class="choice_img" src="${ob[i].choice[ii].choice_img}">`;
								} else {
									choice_img = ob[i].choice[ii].choice;
								}

								str2 += '<li id=duoxuan' + i + '_' + ii + ' class="xuanxiang_duoxuan" onclick="duoxuan_duoxuan(this)">\
						<div class="douxuan-table">\
								<div class="xuanxiang_duoxuan_first_td" id="duoxuan_xuhao_'+ (ii + 1) + '"><div class="choosebox"><div>' + ob[i].choice[ii].choice_tag + '</div></div></div>\
								<div class="xuanxiang_duoxuan_second_td" id="duoxuan_neirong">'+ choice_img + '</div>\
								<div class="xuanze_duigou_duoxuan" id="duoxuan_duigou_'+ (ii + 1) + '" liid="duoxuan_xuhao_' + (ii + 1) + '"></div>\
						</div>\
						</li>\
						';
							}
							str = str + str2;
							str += '</ul>\
					</div>\
					</div>\
					</div>\
					</div>\
				</div>\
				';
							$$("#content_body").append(str);
						}
						else if (type == 3) {//填空题
							var str = '';
							var str = '\
				<div dataa="'+ type + '" class="swiper-slide" id="banner' + i + '" question_id="' + ob[i].question_id + '" score="' + ob[i].score + '" data-sequence="' + ob[i].sequence + '">\
					<div id="tiankong_answer" style="display: none">'+ ob[i].answer + '</div>\
						<div class="main-content">\
						<div class="document">' + richText + '</div>\
						<div class="question-box">\
						<div class="question-wrap">\
						<div class="question-move"><span></span><span></span><span></span></div>\
					<div id="content">\
					<div id="xuanti_laiyuan">\
					<span id="xuanti_laiyuan_one">来源：</span>\
					<span id="xuanti_laiyuan_two">'+ data.data.title + '</span>\
					</div>\
					<div id="xuanti_leixing">\
					<span id="xuanti_leixing_one">填空题</span>\
					</div>\
					<div id="xuanti_neirong">'+ typeName + ob[i].problem + problem_img + '</div>\
					<div id="xuanti_xuanxiang">\
					<input id="tiankongti_tiankong" placeholder="请输入正确答案"/>\
					</div>\
					</div>\
					</div>\
					</div>\
					</div>\
				</div>\
			';
							$$("#content_body").append(str);
						}
						else if (type == 2) {//问答题
							var str = '';
							//				var a='<div data="'+type+'" class="swiper-slide" id="banner'+i+'">'+str+'</div>';
							//				zhenghe += a;
							var str = '\
			<div dataa="'+ type + '" class="swiper-slide" id="banner' + i + '" question_id="' + ob[i].question_id + '" score="' + ob[i].score + '" data-sequence="' + ob[i].sequence + '">\
				<div id="compare" style="display:none;">\
				<span id="zhi">yes</span>\
				</div>\
				<div class="main-content">\
						<div class="document">' + richText + '</div>\
						<div class="question-box">\
						<div class="question-wrap">\
						<div class="question-move"><span></span><span></span><span></span></div>\
				<div id="content">\
				<div id="xuanti_laiyuan">\
				<span id="xuanti_laiyuan_one">来源：</span>\
				<span id="xuanti_laiyuan_two">'+ data.data.title + '</span>\
				</div>\
				<div id="xuanti_leixing">\
				<span id="xuanti_leixing_one">问答题</span>\
				</div>\
				<div id="xuanti_neirong">'+ typeName + ob[i].problem + problem_img + '</div>\
				<div id="xuanti_xuanxiang">\
				<textarea id="wendati_wenda" placeholder="请输入正确的答案"></textarea>\
				</div>\
				</div>\
				</div>\
				</div>\
				</div>\
			</div>\
			';
							$$("#content_body").append(str);
							//$.reinitSwiper();
						}

						if (!isNotNull(ob[i].details)) {
							$$('.question-box').eq(i).css('top', 0);
							$$('.question-wrap').eq(i).css('padding', 0);
							$$('.question-move').eq(i).css('display', 'none');
						}

						if (i == 0) {
							canshu_id = i;
						}
					}//循环结束
				}
				//		console.log(shoucang_question_id);
				//		console.log(zhenghe);
				//$$("#content_body").append(zhenghe);


				//		$.reinitSwiper();
				//    选项
				var ret = "";
				var td_con = "";
				swiper = new Swiper('.swiper-container', {
					pagination: {
						el: '.swiper-pagination',
						type: 'fraction',
					},
					// navigation: {
					// 	nextEl: '.swiper-button-next',
					// 	prevEl: '.swiper-button-prev',
					// },
					pagination: {
						el: '.swiper-pagination',
						clickable: true,
						speed: 300,
						observer: true,//修改swiper自己或子元素时，自动初始化swiper 
						observeParents: false,//修改swiper的父元素时，自动初始化swiper 
						renderBullet: function (index, className) {

							//						下面return为正确
							return '<span class="' + className + '" id="anniu' + (index + 1) + '"><span class="anniu_class"  onclick="datika_xuanxiang()">' + (index + 1) + '</span></span>';
						},
					},
					on: {
						slideChangeTransitionEnd: function () {
							canshu_id = this.activeIndex;
							$$('#currentIndex').text($$('.swiper-slide').eq(this.activeIndex).data('sequence'))
						},
						slidePrevTransitionEnd: function () {
							canshu_id = this.activeIndex;
							$$('#currentIndex').text($$('.swiper-slide').eq(this.activeIndex).data('sequence'))
						}
					}
				});
				$$('#currentIndex').text($$('.swiper-slide').eq(swiper.activeIndex).data('sequence'));

				$$('#xuanti_xiayiti').on('click', function () {
					if ((canshu_id + 1) == $$('.swiper-slide').length) {
						$$(this).css('color', '#999');
					} else {
						swiper.slideTo(canshu_id + 1);
					}
				});
				moveQuestionInit();
				setContentPadding();

				//$.reinitSwiper();
				//	进入页面时触发事件
				//	进入页面进入倒计时
				a = dati_time * 60;
				aa = dati_time * 60;
			} catch (error) {
				console.log(error)
			}
		}

		// 失败的回调函数
		function errorCallBack(data) {
			console.log(data);
		}



		function jijuanCount() {
			submit_paper();
		}

		function submit_paper() {
			$.confirm('确认是否立即交卷？', '确认交卷？', function () {
				getAnwserData();
				datika_jiaojuan();
			});


		}

		//单选题样式变化
		//	function danxuan_danxuan(id,curthis,){
		function danxuan_danxuan(curthis) {
			if (!isChooseClick) {
				return false;
			}
			isChooseClick = false;
			// debounce
			$$(curthis).siblings().find('.xuanxiang_danxuan_first_td .choosebox').removeClass('active');
			$$(curthis).find('.xuanxiang_danxuan_first_td .choosebox').addClass('active');
			var danxuanlie = "." + $$(curthis).attr("class");
			// //		console.log(danxuanlie);
			// //		对勾table的id
			var danxuandiao = "#" + $$(curthis).attr("id") + " .xuanze_duigou_danxuan";
			// //		console.log($$(curthis).attr("id"));
			// //		console.log(danxuandiao);
			// //		对勾class
			var duigouclass = danxuanlie + " .xuanze_duigou_danxuan";
			// //		console.log(duigouclass);
			// $$(danxuanlie).css("background-color", "white");
			// $$(danxuanlie).css("color", "black");
			$$(duigouclass).text("");
			// //		被点击块样式
			// $$(curthis).css("background-color", "#02CAAD");
			// $$(curthis).css("color", "white");
			$$(danxuandiao).text("√");

			setTimeout(() => {
				canshu_id = swiper.activeIndex + 1;
				$$('#xuanti_xiayiti').css('color', '#3d4145');
				swiper.slideTo(canshu_id, 300, false);
				$$('#currentIndex').text($$('.swiper-slide').eq(swiper.activeIndex).data('sequence'));
				setTimeout(() => {
					isChooseClick = true
				}, 300)
			}, 300)

			//		其他样式	
			//		table的class



			//		console.log(curthis.children[0]);
			//		var answer = {id:id,values:a}
			//		checkvalues[curthis.id] = 1;

		}
		//	多选题样式变化
		function duoxuan_duoxuan(curthis) {
			$$(curthis).find('.xuanxiang_duoxuan_first_td .choosebox').toggleClass('active');
			// $$(curthis).toggleClass("duoxuan_beijing_qiehuan");
			// $$(curthis).toggleClass("duoxuan_wenben_qiehuan");
			var duoxuanid = "#" + $$(curthis).attr("id") + " .xuanze_duigou_duoxuan";
			var sss = $$(duoxuanid).text();
			if (isNotNull(sss)) {
				$$(duoxuanid).text("");
			} else {
				$$(duoxuanid).text("√");
			}
		}

		var values = [];

		function getAnwserData() {
			var b = 0;
			var answer_chirdren = {};
			var correct_score_c = "0";
			$(".swiper-slide").each(function () {
				var banner = "#banner" + b;
				var typee = $$(banner).attr("dataa");
				if (typee == 0) {//单选
					//				var a = 4;
					//				console.log(data);
					var banner = "#banner" + b;
					//				var danxuan_xuhao = banner+" .xuanze_duigou_danxuan";
					//				console.log(danxuan_xuhao);

					//				选项数量
					var xuanxiang_length_id = banner + " #xuanxiang_danxuan_ul"
					var xuanxiang_length = $$(xuanxiang_length_id).attr("tdlength");
					//				console.log(xuanxiang_length);

					var xuhao_id = "";//选择选项id
					for (var xuanlen = 0; xuanlen < xuanxiang_length; xuanlen++) {
						//					判断对勾是否存在
						var danxuan_xuhao = banner + " #duigou_" + (xuanlen + 1);
						//					console.log(danxuan_xuhao);
						var danxuanxuhao = $$(danxuan_xuhao).text();
						//					console.log(danxuanxuhao);					
						if (isNotNull(danxuanxuhao)) {
							xuhao_id = "#" + $$(danxuan_xuhao).attr("liid");
						}
						//					console.log(xuhao_id);
					}
					//				输出选项
					var xuanxiang_zimu = "";
					var correct = "";
					xuanxiang_zimu = $$(xuhao_id).text();
					//				console.log(xuanxiang_zimu);
					//				是否正确，正确0，错误1
					if ($$(banner).attr("answerzz") == xuanxiang_zimu) {
						correct = 0;
						correct_score_c = parseFloat(correct_score_c) + parseFloat($$(banner).attr("score"));
					} else {
						correct = 1;
					}
					//				获取内容
					answer_chirdren = {
						"question_id": $$(banner).attr("question_id"),
						"user_answer": xuanxiang_zimu,
						"correct": correct
					}
					answer[b] = answer_chirdren;
					//				console.log(xuanxiang_zimu);
					//				答题卡序号做与未做的区别
					var anniu = "#anniu" + (b + 1) + " .anniu_class";
					if (isNotNull(xuanxiang_zimu)) {
						$(anniu).css("background-color", "#02D9B9");
						$(anniu).css("color", "white");
					} else {
						$(anniu).css("background-color", "white");
						$(anniu).css("color", "#02D9B9");
					}
				}
				else if (typee == 1) {//多选
					//				console.log(typee);
					var banner = "#banner" + b;

					//				选项数量
					var xuanxiang_length_id = banner + " #xuanxiang_duoxuan_ul"
					var xuanxiang_length = $$(xuanxiang_length_id).attr("tdlength");
					//				console.log(xuanxiang_length);

					var xuhao_id = "";//选择选项id
					var xuanxiang_zimu = "";//输出选项
					for (var xuanlen = 0; xuanlen < xuanxiang_length; xuanlen++) {
						//					判断对勾是否存在
						var duoxuan_xuhao = banner + " #duoxuan_duigou_" + (xuanlen + 1);
						//					console.log(duoxuan_xuhao);
						var duoxuanxuhao = $$(duoxuan_xuhao).text();
						//					console.log(duoxuanxuhao);					
						if (isNotNull(duoxuanxuhao)) {
							xuhao_id = "#" + $$(duoxuan_xuhao).attr("liid");
							//						输出选项
							xuanxiang_zimu += $$(xuhao_id).text();
						}
					}
					//				插入","
					var xuanxiang_zimu_zu = xuanxiang_zimu.split("");
					var xuanxiang_zimu_last = "";
					for (var duo_zu = 0; duo_zu < xuanxiang_zimu_zu.length; duo_zu++) {
						xuanxiang_zimu_last = xuanxiang_zimu_last + xuanxiang_zimu_zu[duo_zu] + ",";
					}
					xuanxiang_zimu_last = xuanxiang_zimu_last.replace(/(.*)[,]$/, '$1');
					//				console.log(xuanxiang_zimu_last);
					//				是否正确，正确0，错误1
					var correct = "";
					var choice_d = $$(banner).attr("answerzz");
					// 				choice_d=choice_d.replace(/\s/g, "");
					// 				choice_d=choice_d.replace(/,/g,"");
					// 				choice_d=choice_d.replace(/，/g,"");
					if (xuanxiang_zimu_last == choice_d) {
						correct = 0;
						correct_score_c = parseFloat(correct_score_c) + parseFloat($$(banner).attr("score"));
					} else {
						correct = 1;
					}
					//				console.log($$(banner).attr("answerzz"));
					//				获取内容
					answer_chirdren = {
						"question_id": $$(banner).attr("question_id"),
						"user_answer": xuanxiang_zimu_last,
						"correct": correct
					}
					answer[b] = answer_chirdren;
					//				console.log(answer_chirdren);

					//				答题卡序号做与未做的区别
					//				var anniu = "#anniu"+(b+1);
					//				if(isNotNull(xuanxiang_zimu)){
					//					$(anniu).css("background-color","black");
					//					$(anniu).css("color","white");
					//				}else{
					//					$(anniu).css("background-color","white");
					//					$(anniu).css("color","black");
					//				}
					var anniu = "#anniu" + (b + 1) + " .anniu_class";
					if (isNotNull(xuanxiang_zimu)) {
						$(anniu).css("background-color", "#02D9B9");
						$(anniu).css("color", "white");
					} else {
						$(anniu).css("background-color", "white");
						$(anniu).css("color", "#02D9B9");
					}

				}
				else if (typee == 2) {//问答
					//				console.log(typee);
					var wenda_val = banner + " #wendati_wenda";
					//				console.log(wenda_val);
					//				问答题填写内容
					var wendaval = $(wenda_val).val();
					//				console.log(wendaval);
					//				是否正确，正确0，错误1
					var correct = "";
					wendaval = wendaval.replace(/(^\s*)|(\s*$)/g, '');
					if (isNotNull(wendaval)) {
						correct = 0;
						correct_score_c = parseFloat(correct_score_c) + parseFloat($$(banner).attr("score"));
					} else {
						correct = 1;
					}
					//				获取内容
					answer_chirdren = {
						"question_id": $$(banner).attr("question_id"),
						"user_answer": wendaval,
						"correct": correct
					}
					answer[b] = answer_chirdren;
					//				console.log(answer_chirdren);
					//				答题卡序号做与未做的区别
					//				var anniu = "#anniu"+(b+1);
					//				if(isNotNull(wendaval)){
					//					$(anniu).css("background-color","black");
					//					$(anniu).css("color","white");
					//				}else{
					//					$(anniu).css("background-color","white");
					//					$(anniu).css("color","black");
					//				}
					var anniu = "#anniu" + (b + 1) + " .anniu_class";
					if (isNotNull(wendaval)) {
						$(anniu).css("background-color", "#02D9B9");
						$(anniu).css("color", "white");
					} else {
						$(anniu).css("background-color", "white");
						$(anniu).css("color", "#02D9B9");
					}
				}
				else if (typee == 3) {//填空
					//				console.log(typee);
					var tiankong_val = banner + " #tiankongti_tiankong";
					//				console.log(question);
					//				填空题填写内容
					var tiankongval = $$(tiankong_val).val();
					//				console.log(tiankongval);
					//				是否正确，正确0，错误1
					bannerzz = banner + " #tiankong_answer";
					//				$$(banner).text()
					var correct = "";
					var tiankonganswer = $$(bannerzz).text();
					tiankongval = tiankongval.replace(/(^\s*)|(\s*$)/g, '');
					if (tiankonganswer == tiankongval) {
						correct = 0;
						correct_score_c = parseFloat(correct_score_c) + parseFloat($$(banner).attr("score"));
					} else {
						correct = 1;
					}
					//				获取内容
					answer_chirdren = {
						"question_id": $$(banner).attr("question_id"),
						"user_answer": tiankongval,
						"correct": correct
					}
					answer[b] = answer_chirdren;
					//				console.log(answer_chirdren);

					//				答题卡序号做与未做的区别
					//				var anniu = "#anniu"+(b+1);
					//				if(isNotNull(tiankongval)){
					//					$(anniu).css("background-color","black");
					//					$(anniu).css("color","white");
					//				}else{
					//					$(anniu).css("background-color","white");
					//					$(anniu).css("color","black");
					//				}
					var anniu = "#anniu" + (b + 1) + " .anniu_class";
					if (isNotNull(tiankongval)) {
						$(anniu).css("background-color", "#02D9B9");
						$(anniu).css("color", "white");
					} else {
						$(anniu).css("background-color", "white");
						$(anniu).css("color", "#02D9B9");
					}
				}
				b = b + 1;
			});
			//		console.log(answer);
			//		console.log(correct_score_c);
			correct_score = correct_score_c;

		}


		function setContentPadding() {
			let height = $$('.sub-nav').height();
			$$('.swiper-boxs').css({ 'padding-top': height + 'px' });
			savBarHeight = $$('.sub-nav-bar').height();
			barNav = $$('.bar-nav').height();
		}
		setContentPadding()

		$$(function () {
			
			// "getParams?paper_id="+1+"&sequence="+1
			// getParams("getParams?id=31&paper_id=" + 83 + "&question_id=" + 148)
			// getParams("getParams?id=1")
			$.init();

		});

	</script>
</body>

</html>